﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Sublimation
{
    public class UpgradeNode : GameObject
    {
        protected String name;
        public String Name
        {
            set { name = value; }
            get { return name; }
        }
        protected String description;
        public String Description
        {
            set { description = value; }
            get { return description; }
        }

        protected SlotKind kind;
        public SlotKind Kind
        {
            set { kind = value; }
            get { return kind; }
        }

        protected List<UpgradeNode> childUpgrades;
        public List<UpgradeNode> ChildUpgrades
        {
            set { childUpgrades = value; }
            get { return childUpgrades;  }
        }

        // for root node
        public UpgradeNode(WorldProperties worldProperties , List<UpgradeNode> childUpgrades):base(worldProperties)
        {
            this.childUpgrades = childUpgrades;
        }
        public UpgradeNode(WorldProperties worldProperties, SlotKind kind, String name, String description, Texture2D texture, Vector2 position, List<UpgradeNode> childUpgrades)
            : base(worldProperties)
        {
            this.scale = 1f;
            this.DrawOrder = 102;
            this.kind = kind;
            this.name = name;
            this.description = description;
            this.Sprite = texture;
            this.childUpgrades = childUpgrades;

            this.Visible = false; // don't draw at start


            SetOriginToCentre();
            this.Position = position;
        }
    }
}
